package com.hb.mapper;

import com.hb.entity.User;
import com.hb.entity.UserAddress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author hubin
 * @description
 * @createTime 2024/3/8 15:22
 */
@Mapper
public interface UserMapper {

    int insert(@Param("user") User user);

    int batchInsert(@Param("users") List<User> users);

    int updateById(@Param("user") User user);

    int batchUpdate(@Param("users") List<User> users);

    int updatePassword(@Param("idGt") Long idGt, @Param("encryptedPassword") String encryptedPassword);

    User selectById(@Param("id") Long id);

    List<User> selectList(@Param("ids") List<Long> ids);

    List<User> selectAll();

    List<UserAddress> selectUserAddress();

    List<String> selectAllPassword();

    String selectPasswordById(@Param("id") Long id);
}
